class MonthlyPackageTransferBean {
  int? id;
  String? receivedDate;
  String? groupName;
  String? newCustomerNo;
  String? customerName;
  String? region;
  double? originalMonthlyFee;
  int? quantityKeDa;
  double? sellingSilverCode;
  int? numberPackageTickets;
  double? average;
  String? validityPeriod;
  String? oldCustomerNumber;
  String? oldCustomerDisDate;
  String? remark;
  String? dateRange;
  String? createDate;
  int? directFranchisee;

  MonthlyPackageTransferBean({
    this.id,
    this.receivedDate,
    this.groupName,
    this.newCustomerNo,
    this.customerName,
    this.region,
    this.originalMonthlyFee,
    this.quantityKeDa,
    this.sellingSilverCode,
    this.numberPackageTickets,
    this.average,
    this.validityPeriod,
    this.oldCustomerNumber,
    this.oldCustomerDisDate,
    this.remark,
    this.dateRange,
    this.createDate,
    this.directFranchisee,
  });

  factory MonthlyPackageTransferBean.fromJson(Map<String, dynamic> json) {
    // 改为驼峰命名法
    return MonthlyPackageTransferBean(
      id: json['id'],
      receivedDate: json['receivedDate'],
      groupName: json['groupName'],
      newCustomerNo: json['newCustomerNo'],
      customerName: json['customerName'],
      region: json['region'],
      originalMonthlyFee: json['originalMonthlyFee'],
      quantityKeDa: json['quantityKeDa'],
      sellingSilverCode: json['sellingSilverCode'],
      numberPackageTickets: json['numberPackageTickets'],
      average: json['average'],
      validityPeriod: json['validityPeriod'],
      oldCustomerNumber: json['oldCustomerNumber'],
      oldCustomerDisDate: json['oldCustomerDisDate'],
      remark: json['remark'],
      dateRange: json['dateRange'],
      createDate: json['createDate'],
      directFranchisee: json['directFranchisee'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};

    // 改为驼峰命名
    data['id'] = id;
    data['receivedDate'] = receivedDate;
    data['groupName'] = groupName;
    data['newCustomerNo'] = newCustomerNo;
    data['customerName'] = customerName;
    data['region'] = region;
    data['originalMonthlyFee'] = originalMonthlyFee;
    data['quantityKeDa'] = quantityKeDa;
    data['sellingSilverCode'] = sellingSilverCode;
    data['numberPackageTickets'] = numberPackageTickets;
    data['average'] = average;
    data['validityPeriod'] = validityPeriod;
    data['oldCustomerNumber'] = oldCustomerNumber;
    data['oldCustomerDisDate'] = oldCustomerDisDate;
    data['remark'] = remark;
    data['dateRange'] = dateRange;
    data['createDate'] = createDate;
    data['directFranchisee'] = directFranchisee;
    return data;
  }

  MonthlyPackageTransferBean.empty() {
    DateTime now = DateTime.now();
    String createDate = "${now.year}-${now.month.toString().padLeft(2, '0')}-${now.day.toString().padLeft(2, '0')}";
    id = 0;
    receivedDate = "";
    groupName = "";
    newCustomerNo = "";
    customerName = "";
    region = "";
    originalMonthlyFee = 0.00;
    quantityKeDa = 0;
    sellingSilverCode = 0;
    numberPackageTickets = 0;
    average = 0.00;
    validityPeriod = "";
    oldCustomerNumber = "";
    oldCustomerDisDate = "";
    remark = "";
    dateRange = "";
    createDate = createDate;
    directFranchisee = 0;
  }
}
